package com.zmx.patientend.view.activity;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.RadioGroup;
import android.widget.TextView;

import com.gyf.immersionbar.ImmersionBar;
import com.zmx.patientend.BaseActivity;
import com.zmx.patientend.R;
import com.zmx.patientend.view.util.MyDialog;
import com.zmx.patientend.view.util.ViewStar;

/**
*时间：2020/4/29 17:13
*功能：电话急诊
*/
public class CallEmergencyActivity extends BaseActivity {


    ViewStar ratingbar1,ratingbar2,ratingbar3,ratingbar4,ratingbar5,ratingbar6;
    TextView keshi;

    @Override
    protected int getLayoutId() {
        return R.layout.activity_call_emergency;
    }

    @Override
    protected void initViews() {

        setToolbar(R.id.tool_bar);
        ratingbar1 = findViewById(R.id.ratingbar1);
        float f = 5;
        ratingbar1.setStar(f);
        ratingbar1.setClickable(false);

        ratingbar2 = findViewById(R.id.ratingbar2);
        ratingbar2.setStar(f);
        ratingbar2.setClickable(false);

        ratingbar3 = findViewById(R.id.ratingbar3);
        ratingbar3.setStar(f);
        ratingbar3.setClickable(false);


        ratingbar4 = findViewById(R.id.ratingbar4);
        ratingbar4.setStar(f);
        ratingbar4.setClickable(false);


        ratingbar5 = findViewById(R.id.ratingbar5);
        ratingbar5.setStar(f);
        ratingbar5.setClickable(false);


        ratingbar6 = findViewById(R.id.ratingbar6);
        ratingbar6.setStar(f);
        ratingbar6.setClickable(false);

        keshi = findViewById(R.id.keshi);
        keshi.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                showDialog();
            }
        });
    }



    //    弹出框
    private MyDialog mMyDialog;

    public void showDialog() {

        View view = LayoutInflater.from(mActivity).inflate(R.layout.dialog_keshi, null);
        mMyDialog = new MyDialog(mActivity, 0, 0, view, R.style.DialogTheme);
        mMyDialog.setCancelable(true);
        mMyDialog.show();


    }

    }
